package com.elitesland.core.util;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;

/**
 * <pre>
 * 封装请求，并替换getParameter从原有的Parameter获取值，为从Attribute中获取值
 * </pre>
 *
 * @author Mir
 * @date 2020/6/16
 */
public class ParameterRequestWrapper extends HttpServletRequestWrapper {

    public ParameterRequestWrapper(HttpServletRequest request) {
        super(request);
    }

    @Override
    public String getParameter(String name) {
        return (String) super.getAttribute(name);
    }
}
